//
// PowerUp - Sacred Fountain
//
// L. Dean Gibson II 2/8/01
//
//
// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#include "precompiled.h"
#pragma warning( disable: 4786 )

#include "adv_sacred_fountain.h"

#include "adv_object_type.h"
#include "basic_dialog.h"
#include "dialog_magic_gem.h"
#include "hero.h"
#include "object_registration.h"
#include "replace_keywords.h"

static t_object_registration<t_adv_sacred_fountain> k_registration( k_adv_object_sacred_grove );


// -------------------------------------------------------------
// hero gains +3 spell points permanently for free
// -------------------------------------------------------------
t_adv_sacred_fountain::t_adv_sacred_fountain( std::string const& model_name )
         : t_single_use_object( model_name )
{
}


// -------------------------------------------------------------
// hero gains +3 spell points permanently for free
// -------------------------------------------------------------
std::string t_adv_sacred_fountain::add_icons( t_basic_dialog* dialog, std::string const& text, std::vector<t_hero*> const& heroes )
{
	dialog->add_spell_points( 3 );
	return replace_keywords( text, "%spell points", "3" );
}

// -------------------------------------------------------------
// hero gains +3 spell points permanently for free
// -------------------------------------------------------------
void t_adv_sacred_fountain::visit( t_hero* hero )
{
	add_to_spell_points( hero, 3 );
}


